This tutorial will walk through how to setup a Virtual Breadboard test circuit to send 2 axis gesture analog data to a Raspberry Pi Pico via the EDGEY interface for classification. The classified label is output on an IO pin which is read back into Virtual Breadboard and displayed as a LED and also linked to a graphic card displaying the result visually.
The test circuit consists of a ScratchPad which generates X,Y voltages from 2D drawn gestures and a DIP component which is used to set the labels being gestures being captured.
Components Used
The Scratch Pad Pad component captures mouse or stylus motions into X,Y voltages that can be recorded as gesture motion.
Property | Value |
Mode | record-playback |
Period | 2 |
The Raspberry Pi Pico avatar synchronises IO with a physical Pico device via the EDGEY interface. The test circuit will be sending analog gesture data to be read into the Pico and classified with the neural network model programmed in the Pico and will read the IO output and display the results in VBB.
Property | Value |
Connection | Select COM Port EDGEY is connected to |
The Sample and Mux component is used to send multiple analog channels over a single analog DAC channel.
Wire the components together using the following netlist
The Basic Output circuit consists of a LEDN component used to show visually the current state of an IO pin. There are 3 pins, Rock, Paper, Scissors used to show the current state. Place a LEDN, change it's property to 3 pins and positions to GPIO2,3,4 of the Pico.
space
or rotate icon to rotate to a vertical orientationProperty | Value |
PinCount | 3 |
You are now ready to test the gesture classifier.
While classifying the Pico is outputing additional debug information regarding the inference results of the neural network used to reach it's conclusion
While LED's give a quick visualisation of the result it is often more satisfying to build a rich visual control panel. The Toggle Image component can be used to quickly build a visual control panel using screenshots captured using the Windows Snipping Tool.
Pin = top
to position the pin to the topIn the next steps the Snipping Tool is used to clip screenshot regions and save them as images. We are going to take snapshots of the Scratch Pad drawings to use them as control panel elements. We need 4 images, a blank image with no drawing which all 3 Toggle Image components will use and drawn image of each of Rock, Paper, Scissor gestures.
The Image Property Editor custom dialog allows you to paste from the Clipboard to an image property
BitmapOff
custom dialog [...]Duplicate 2 copies of the Toggle Image with the empty Bitmap Off and move them side by side
BitmapMap
custom dialog [...] of the leftmost Toggle Image componentRepeat the previous step for both Paper and Scissors. You wan't see the captured gesture because they are saved to the BitmapOn
property
The Toggle Image's can now be wired to the GPIO Pins.
Now when you draw the gestures the classification will display the image of the performed gesture giving satisfying feedback and also the basis for a gesture based game.
Congratulations, you have successfully created a test circuit, accurately classified 3 gestures and created a visual display panel that displays a picture of the gesture you performed all without any programming.